package com.example.pojo;

public class Student {

    // 属性
    private String studentId; // 学号
    private String name;     // 姓名
    private Integer age;         // 年龄
    private String college;  // 学院
    private String major;    // 专业
    private String password; // 密码
    private String role;     // 角色
    private String phone;    // 电话
    private String grade;    // 年级

    // 无参构造函数
    public Student() {
    }

    // 全参构造函数
    public Student(String studentId, String name, Integer age, String college,
                   String major,  String phone, String grade) {
        this.studentId = studentId;
        this.name = name;
        this.age = age;
        this.college = college;
        this.major = major;
        this.phone = phone;
        this.grade = grade;
    }

    // Getter 和 Setter 方法
    public String getStudentId() {
        return studentId;
    }

    public void setStudentId(String studentId) {
        this.studentId = studentId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getCollege() {
        return college;
    }

    public void setCollege(String college) {
        this.college = college;
    }

    public String getMajor() {
        return major;
    }

    public void setMajor(String major) {
        this.major = major;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getGrade() {
        return grade;
    }

    public void setGrade(String grade) {
        this.grade = grade;
    }

    // toString 方法
    @Override
    public String toString() {
        return "Student{" +
                "studentId='" + studentId + '\'' +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", college='" + college + '\'' +
                ", major='" + major + '\'' +
                ", password='" + password + '\'' +
                ", role='" + role + '\'' +
                ", phone='" + phone + '\'' +
                ", grade='" + grade + '\'' +
                '}';
    }
}